package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvoiceDetailMapper;
import com.ruoyi.system.domain.InvoiceDetail;
import com.ruoyi.system.service.IInvoiceDetailService;

/**
 * 开票详情记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-19
 */
@Service
public class InvoiceDetailServiceImpl implements IInvoiceDetailService 
{
    @Autowired
    private InvoiceDetailMapper invoiceDetailMapper;

    /**
     * 查询开票详情记录
     * 
     * @param id 开票详情记录主键
     * @return 开票详情记录
     */
    @Override
    public InvoiceDetail selectInvoiceDetailById(Long id)
    {
        return invoiceDetailMapper.selectInvoiceDetailById(id);
    }

    /**
     * 查询开票详情记录列表
     * 
     * @param invoiceDetail 开票详情记录
     * @return 开票详情记录
     */
    @Override
    public List<InvoiceDetail> selectInvoiceDetailList(InvoiceDetail invoiceDetail)
    {
        return invoiceDetailMapper.selectInvoiceDetailList(invoiceDetail);
    }

    /**
     * 新增开票详情记录
     * 
     * @param invoiceDetail 开票详情记录
     * @return 结果
     */
    @Override
    public int insertInvoiceDetail(InvoiceDetail invoiceDetail)
    {
        return invoiceDetailMapper.insertInvoiceDetail(invoiceDetail);
    }

    /**
     * 修改开票详情记录
     * 
     * @param invoiceDetail 开票详情记录
     * @return 结果
     */
    @Override
    public int updateInvoiceDetail(InvoiceDetail invoiceDetail)
    {
        return invoiceDetailMapper.updateInvoiceDetail(invoiceDetail);
    }

    /**
     * 批量删除开票详情记录
     * 
     * @param ids 需要删除的开票详情记录主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceDetailByIds(Long[] ids)
    {
        return invoiceDetailMapper.deleteInvoiceDetailByIds(ids);
    }

    /**
     * 删除开票详情记录信息
     * 
     * @param id 开票详情记录主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceDetailById(Long id)
    {
        return invoiceDetailMapper.deleteInvoiceDetailById(id);
    }

    @Override
    public Double getSumMoney(InvoiceDetail invoiceDetail) {
        return invoiceDetailMapper.getSumMoney(invoiceDetail);
    }

    @Override
    public List<InvoiceDetail> selectList(InvoiceDetail invoiceDetail) {
        return invoiceDetailMapper.selectList(invoiceDetail);
    }
}
